#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

#define MAX_N 1000
int a[MAX_N + 5], b[MAX_N + 5], idx[MAX_N + 5];



int main(){
    int n;
    cin >> n;
    for(int i = 0; i <= n; i++){
        cin >> a[i] >> b[i];
        idx[i] = i;
    }
    sort(idx + 1, idx + n + 1,[&](int i, int j) ->bool{
        return a[i] * b[i] < a[j] * b[j];
    });
    int p = a[0], ans = 0;
    for(int i = 1; i <= n; i++){
        if(p / b[idx[i]] > ans) ans = p / b[idx[i]];
        p *= a[idx[i]];
    }
    cout << ans << endl;
    return 0;
}